package com.example.demo;

import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Modality;
import javafx.stage.Stage;

import java.io.IOException;
import java.util.Stack;

public class HelloController {


    public static StringProperty  welcomeTextStringProperty = new SimpleStringProperty("");


    @FXML
    private Label welcomeText;


    @FXML
    public void initialize(){
         welcomeText.textProperty().bind(welcomeTextStringProperty);
    }

    @FXML
    protected void onHelloButtonClick() throws IOException {
//        ModalStage  stage =new ModalStage(HelloApplication.primaryStage, "药品列表"     );
//        FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("yaopinliebiao-view.fxml"));
//
//
//        AnchorPane  root = fxmlLoader.load();
//
//
//        Scene scene = new Scene(root, 520, 440);
//        stage.setScene(scene);
//
//        stage.setTitle("药品列表");
//        stage.initOwner(HelloApplication.primaryStage);
//        stage.initModality(Modality.APPLICATION_MODAL);// 可以选择不同类型的模态框
//        stage.showAndWait();// 显示



    }
}